package com.fallsvc.order.controller;

import com.fallsvc.order.model.OrderInfo;
import com.fallsvc.order.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther falls_vc
 * description:
 * @date 2025/5/25  11:05
 */
@Slf4j
@RequestMapping("/order")
@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    @RequestMapping("/{orderId}")
    public OrderInfo getOrderInfoById(@PathVariable("orderId")Integer orderId) {
        log.info("接收参数 orderId：{}",orderId);
        return orderService.selectOrderById(orderId);
    }
}
